<template>
  <a-card :bordered='false' size='small' style="height:100%;">
    <data-source @success="dataSourceOk"/>
    <a-tabs default-active-key="1" tab-position="left">
      <a-tab-pane key="1" tab="服务端代码生成">
        <server-code ref="serverCode" />
      </a-tab-pane>
      <a-tab-pane key="2" tab="前端代码生成（无用）">
        <page-code />
      </a-tab-pane>
    </a-tabs>
  </a-card>
</template>
<script>
import DataSource from './dataSource'
import PageCode from './pageCode.vue'
import ServerCode from './serverCode.vue'
export default {
  components: { DataSource, ServerCode, PageCode },
  data() {
    return {
    }
  },
  created() {},
  mounted() {
  },
  methods: {
    confDataSource() {
      this.$refs.datasource.showModal()
    },
    success(data) {
      this.datasourceName = '当前数据源：' + data.name
    },
    dataSourceOk() {
      this.$refs.serverCode.init()
    }
  }
}
</script>
<style></style>
